Skip to content

feat: Setup new S2 docs website #8300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 96 commits into from
Jun 23, 2025
Merged

feat: Setup new S2 docs website #8300

merged 96 commits into from
Jun 23, 2025

Conversation

devongovett
Copy link
Member

@devongovett devongovett commented May 23, 2025

Sets up new docs website, built using S2 components and Parcel's react server components support. All content and website UI is early and subject to change, but we can get this in as a starting point.

Test old docs, starters, etc. to ensure nothing broke.

@rspbot
Copy link

rspbot commented May 23, 2025

This reverts commit 96474a4.

# Conflicts:
#	packages/@react-aria/dnd/stories/Reorderable.tsx
@rspbot

This comment was marked as off-topic.

# Conflicts:
#	packages/dev/s2-docs/package.json
#	packages/dev/s2-docs/src/CodePlatter.tsx
#	packages/dev/s2-docs/src/Layout.tsx
#	packages/dev/s2-docs/src/Nav.tsx
#	yarn.lock
@rspbot
Copy link

rspbot commented Jun 20, 2025

@rspbot
Copy link

rspbot commented Jun 20, 2025

@@ -10,6 +10,8 @@
* governing permissions and limitations under the License.
*/

'use client';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to how our build works, this won't actually affect our released packages at the moment, so it'll only be used by the docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so deferring this conversation?

@@ -44,7 +44,8 @@ const modalOverlayStyles = style({
transitionDuration: {
default: 250,
isExiting: 130
}
},
zIndex: 9999
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how we actually want to handle this, but it works for now. Our old isolation: isolate trick doesn't work anymore because there is no top-level provider wrapper around the main page content in S2, so the modals/popovers are siblings of the reset of the page.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooo, tricky... hmmmm

i know we don't like this, but maybe we should consider having our Provider be mandatory. people are already used to it and seem to be frequently reaching for it anyways.
though a wrench in that is that then if they use both a v3 and s2 provider, they'd get two levels of isolation, shouldn't be a problem, but depends if anything is placed in between

I've also seen groups using a number larger than this one... :(

@@ -68,16 +68,21 @@ export interface ScrollableProps<T extends Element> {
onScroll?: (e: UIEvent<T>) => void
}

type ClassNameOrFunction<T> = string | ((values: T & {defaultClassName: string | undefined}) => string);
type StyleOrFunction<T> = CSSProperties | ((values: T & {defaultStyle: CSSProperties}) => CSSProperties | undefined);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just to make the types render cleaner in docs prop tables. Actual types haven't changed.

@rspbot
Copy link

rspbot commented Jun 20, 2025

@devongovett devongovett marked this pull request as ready for review June 21, 2025 00:01
@@ -1,3 +1,4 @@
'use client';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added 'use client' to all starter kit examples, which is how users should generally implement our components as well.

@rspbot
Copy link

rspbot commented Jun 21, 2025

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There appears to be an issue with the Style Macro? I tried going to the react aria page for Button, then clicked through the other css options and wound up with a completely black screen.

FYI, this is what it looks like to someone who has scrollbars always on. Happy to help fix after merge.
Screenshot 2025-06-23 at 9 21 22 am

@@ -44,7 +44,8 @@ const modalOverlayStyles = style({
transitionDuration: {
default: 250,
isExiting: 130
}
},
zIndex: 9999
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooo, tricky... hmmmm

i know we don't like this, but maybe we should consider having our Provider be mandatory. people are already used to it and seem to be frequently reaching for it anyways.
though a wrench in that is that then if they use both a v3 and s2 provider, they'd get two levels of isolation, shouldn't be a problem, but depends if anything is placed in between

I've also seen groups using a number larger than this one... :(

@@ -86,7 +86,6 @@ export interface PickerStyleProps {
size?: 'S' | 'M' | 'L' | 'XL',
/**
* Whether the picker should be displayed with a quiet style.
* @private
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need to verify this is actually ready for use

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's not ready about it? It's in Figma, and has been supported for a while. I'm not sure why it was private?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't recall doing testing with it, that was all

@@ -10,6 +10,8 @@
* governing permissions and limitations under the License.
*/

'use client';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so deferring this conversation?

Each of these handlers receives a <TypeLink links={typesDocs.links} type={typesDocs.exports.PressEvent} />, which exposes information about the target and the type of event that triggered the interaction. See [usePress](usePress.html) for more details.

```tsx render
"use client";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for our own rendering? or is this something that users should be paying attention to as well?


return (
<>
<Button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do the styles for this one come from? I assume Vanilla CSS example which only uses the data-* and dom structure and so that's how it works

@@ -0,0 +1,89 @@
// https://gist.github.com/rvaiya/4a2192df729056880a027789ae3cd4b7
// Author: Raheman Vaiya
// License: WTFPL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add to LICENSE?

@rspbot
Copy link

rspbot commented Jun 23, 2025

@rspbot

This comment was marked as off-topic.

Comment on lines +8 to +9
"generate:og": "node scripts/generateOg.mjs",
"generate:md": "node scripts/generateMd.mjs"
Copy link
Member

@reidbarber reidbarber Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we'll run these with the docs build. I should also give these better names.

/**
* Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit.
*/
export const Tabs = forwardRef(function Tabs(props: TabsProps, ref: DOMRef<HTMLDivElement>) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: update to match the latest S2 tabs code.

@devongovett devongovett added this pull request to the merge queue Jun 23, 2025
Comment on lines +102 to +106
<MenuItem key={item.id} id={item.id} href={`/${libraryKey}/${item.name}.html`} aria-label={item.name} textValue={item.name}>
{item.thumbnail && <Image src={item.thumbnail.toString()} alt={item.name} />}
<Text slot="label">{item.name}</Text>
{item.description && <Text slot="description">{item.description}</Text>}
</MenuItem>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: add real thumbnails and descriptions

Merged via the queue into main with commit ef071a5 Jun 23, 2025
31 checks passed
@devongovett devongovett deleted the s2-docs2 branch June 23, 2025 20:52

let a = document.createElement('a');
a.href = URL.createObjectURL(blob);
a.download = 'example.zip';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom name based on section title?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants